<script setup lang="ts">
import { useRouter } from "vue-router";

const router = useRouter();
const route = router.currentRoute;
</script>

<template>
  <div class="goBack" v-if="route.query?.isChild" @click="() => router.back()">
    <lay-icon size="xs" type="layui-icon-prev" color="#fff"> </lay-icon> 返回
  </div>
</template>

<style lang="less" scoped>
.goBack {
  width: 52px;
  height: 30px;
  position: absolute;
  top: 12px;
  left: 0px;
  background: #1f9688;
  color: #ffffff;
  line-height: 30px;
  border-radius: 2px;
  z-index: 99999;
  cursor: pointer;
}
</style>
